let { observable, observe, computed, autorun } = require("mobx");

class Person {
    @observable name = "js";
    @observable age = 9;
    @observable list = {
        id: "1",
        name: "2"
    }
    //手机号拼接
    @observable area = "010";
    @observable photo = "15945789456";

    @computed get home() {
        return this.area + "_" + this.photo
    }
}

let b = new Person();
//当自系统自动运行，就运行，
// autorun(()=>{
//     console.log(b.home)
// })


// let c = new Person();
// let photo = computed(()=>{
//     return c.area
// })

// photo.observe(c=>console.log(c))
// // observe(photo, c => console.log(c))
// c.area = "html"

